﻿using System;

namespace EasyBackup.Utils
{
    static class App
    {
        private static string ProgramFiles = ProgramFilesx86();
        public static string Location = ProgramFiles + @"\Easy Backup";
        public static string LogDir = ProgramFiles + @"\Easy Backup\Logs";
        public static string SchedulePath = ProgramFiles + @"\Easy Backup\schedule.txt";

        private static string ProgramFilesx86()
        {
            if (8 == IntPtr.Size
                || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432"))))
            {
                return Environment.GetEnvironmentVariable("ProgramFiles(x86)");
            }

            return Environment.GetEnvironmentVariable("ProgramFiles");
        }
    }
}
